package com.buyingtickets.service.impl;

import com.buyingtickets.dao.UnitSeatDao;
import com.buyingtickets.entity.Ticket;
import com.buyingtickets.entity.TrainNumber;
import com.buyingtickets.service.TicketBiz;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TicketBizImpl implements TicketBiz {
    @Resource
    private UnitSeatDao unitSeatDao;

    @Override
    public List<Ticket> queryBySatrt(String siteStart, String siteEnd, String startDate) {
        return null;
    }

    @Override
    public Ticket queryBy(TrainNumber trainNumber) {
        //1、通过通过车次ID、起点站点顺序、终点站点顺序、座位类型、座位位置(出票的第一层逻辑、最大终点站)（UnitSeatDao）（queryByChuPiaoOne）
        unitSeatDao.queryByChuPiaoOne(trainNumber);
        return null;
    }

    @Override
    public int tuiPiao(TrainNumber trainNumber) {
        return unitSeatDao.tuiPiao(trainNumber);
    }
}
